home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Alliance.dxr / 00002_Machine data.ls < prev    next >
Encoding:
Text File  |  1998-12-04  |  1.6 KB  |  65 lines

  1. property hardware, oldSoundVolume, currSndVolume, oldColorLevel, timeDate, pathSep
  2.  
  3. on new me
  4.   return me
  5. end
  6.  
  7. on getMachineDAta me
  8.   if the platform starts "Mac" then
  9.     set the hardware of me to #Mac
  10.     set the pathSep of me to ":"
  11.   else
  12.     set the hardware of me to #IBM
  13.     set the pathSep of me to "\"
  14.   end if
  15.   set the oldSoundVolume of me to the soundLevel
  16.   set the oldColorLevel of me to the colorDepth
  17.   set vTime to the short time
  18.   set vDate to the short date
  19.   set the timeDate of me to [#time: vTime, #date: vDate]
  20. end
  21.  
  22. on setMachine me
  23.   if the oldColorLevel of me <> 8 then
  24.     case the hardware of me of
  25.       #IBM:
  26.         alert("You might get better performance if you reset your monitor to 256 colors.")
  27.       #Mac:
  28.         set the colorDepth to 8
  29.     end case
  30.   end if
  31.   set the currSndVolume of me to 4
  32.   set the soundLevel to the currSndVolume of me
  33. end
  34.  
  35. on restoreMachine me
  36.   if the oldColorLevel of me <> 8 then
  37.     if the hardware of me = #Mac then
  38.       set the colorDepth to the oldColorLevel of me
  39.     end if
  40.   end if
  41.   set the soundLevel to the oldSoundVolume of me
  42. end
  43.  
  44. on setVolume me, vLevel
  45.   set the currSndVolume of me to vLevel
  46.   set the soundLevel to the currSndVolume of me
  47. end
  48.  
  49. on computerType me
  50.   return string(the hardware of me)
  51. end
  52.  
  53. on getTimeDate me
  54.   set vDataString to getProp(the timeDate of me, #time) & "    " & getProp(the timeDate of me, #date)
  55.   return vDataString
  56. end
  57.  
  58. on showProperties me
  59.   put "hardware:" && the hardware of me
  60.   put "oldSoundVolume:" && the oldSoundVolume of me
  61.   put "currSndVolume:" && the currSndVolume of me
  62.   put "oldColorLevel:" && the oldColorLevel of me
  63.   put "timeDate:" && the timeDate of me
  64. end
  65.